#Target
TgtFile = EMVSRC

SrcFile0 = APACSpin
SrcFile1 = d3des
SrcFile2 = emvcall
SrcFile3 = EMViso
SrcFile4 = emvsrc
SrcFile5 = EMVTC

# App Source Paths
SrcDir = C:\softpay\ver30\HOSTSRC\EMVSRC

AppObjects = \
	$(OBJ_DIR)\$(SrcFile0).o  \
	$(OBJ_DIR)\$(SrcFile1).o  \
	$(OBJ_DIR)\$(SrcFile2).o  \
	$(OBJ_DIR)\$(SrcFile3).o  \
	$(OBJ_DIR)\$(SrcFile4).o  \
	$(OBJ_DIR)\$(SrcFile5).o  

# Compiler Options
MkIncludes = -J $(SDS_INCLUDES) -I $(ACT_INCLUDES) -I $(SP2_INCLUDES) -I $(SERF_INCLUDES) -I $(CLS_INCLUDES) -I $(VVXEMV_INCLUDES) 
COptions = $(GCOPTIONS) -c -O2 -bi -g+ -cpu ARM920T -Wrx -DK2 -DARM -o$(@)

#  Target Definition Library
$(LIB_DIR)\$(TgtFile).a : $(AppObjects)
	@$(RVCTBIN)\armar -r $(LIB_DIR)\$(TgtFile).a $(AppObjects)


$(OBJ_DIR)\$(SrcFile0).o : $(SrcDir)\$(SrcFile0).c  
	@echo COMPILING...$(SrcFile0).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile0).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

$(OBJ_DIR)\$(SrcFile1).o : $(SrcDir)\$(SrcFile1).c  
	@echo COMPILING...$(SrcFile1).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile1).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

$(OBJ_DIR)\$(SrcFile2).o : $(SrcDir)\$(SrcFile2).c  
	@echo COMPILING...$(SrcFile2).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile2).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

$(OBJ_DIR)\$(SrcFile3).o : $(SrcDir)\$(SrcFile3).c  
	@echo COMPILING...$(SrcFile3).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile3).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

$(OBJ_DIR)\$(SrcFile4).o : $(SrcDir)\$(SrcFile4).c  
	@echo COMPILING...$(SrcFile4).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile4).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

$(OBJ_DIR)\$(SrcFile5).o : $(SrcDir)\$(SrcFile5).c  
	@echo COMPILING...$(SrcFile5).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile5).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

